$(function() {
	$('body').append('<div id="more-info" class="tip"><div class="tcnt"><table><tr><td></td><td class="tl"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" width="10" height="10" /></td><td class="tm"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" /></td><td class="tr"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" width="10" height="10" /></td></tr><tr><td class="tail"><div>&nbsp;</div></td><td class="ml"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" /></td><td class="mm"><div class="out"></div></td><td class="mr"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" /></td></tr><tr><td>&nbsp;</td><td class="bl"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" width="10" height="10" /></td><td class="bm"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" /></td><td class="br"><img src="' + tm.Config.imgsPath + 'b.gif" alt="" width="10" height="10" /></td></tr></table></div></div>');

	$('.info a.question').bind('mousemove', function(e) {
		var text = $(this).metadata().text;
		$('#more-info').find('div.out').html(text);
		var top = getMouseCoordinates(e)[1] + 15;
		var left = getMouseCoordinates(e)[0] + 20;
		
		$('#more-info').css({
			top: top + 'px',
			left: left + 'px'
		});
		$('#more-info').show();
	});

	$('.info a.question').bind('mouseout', function() {
		$('#more-info').hide();
	});

	function getMouseCoordinates(e) {
		var x = e.clientX + document.documentElement.scrollLeft;
		var y = e.clientY + document.documentElement.scrollTop;
		return [x,y];
	}

});
